import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Boton para cambiar pantalla a la de ayuda del juego.
 * 
 * @author Asael Hernández García
 * @version (a version number or a date)
 */
public class Help extends Boton
{
    /**
     * Act - do whatever the Help wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    private Return back;
    private Next next;
    
    public Help()
    {
        back = new Return();
        next = new Next();
    }
    
    public void act() 
    {
       if(Greenfoot.mouseClicked(this)){
           getWorld().setBackground("Help.png");
           getWorld().addObject(back,50,56);
           getWorld().addObject(next,863,528);
           getWorld().removeObjects(getWorld().getObjects(Credits.class));
           getWorld().removeObjects(getWorld().getObjects(Records.class));
           getWorld().removeObjects(getWorld().getObjects(Play.class));
           getWorld().removeObject(this);
       }
    }    
}
